The Dreamweaver JavaScript API > History functions > dreamweaver.historyPalette.getStepsAsJavaScript()

 

dreamweaver.historyPalette.getStepsAsJavaScript()

Availability

Dreamweaver 3.0

Description

Gets the JavaScript equivalent of the specified history steps.

Arguments

arrayOfIndices

arrayOfIndices is an array of position indices in the History panel.

Returns

A string containing the JavaScript that corresponds to the specified history steps.

Enabler

None.

Example

If the three steps shown in this example are selected in the History panel, a call to dw.historyPalette.getStepsAsJavaScript(dw.historyPalette.getSelectedSteps()) returns "dw.getDocumentDOM().insertText('Hey diddle diddle, a cat and a fiddle, the cow jumped over the moon.');\ndw.getDocumentDOM().newBlock();\n dw.getDocumentDOM().insertHTML('<img src=\"../wdw99/50browsers/images/sun.gif\">', true);\n":